#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
struct
{
	int year;
	int month;
	int day;
}date;
int day[13] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 };
int main()
{
	int days = 0, i;
	printf("input year,month,day:");
	scanf("%d.%d.%d", &date.year, &date.month, &date.day);
	for (i = 1; i < date.month; i++)
		days += day[i];
	days += date.day;
	if ((date.year % 4 == 0 && date.year % 100 != 0 || date.year % 400 == 0) && date.month >= 3)
		days += 1;
	printf("%d/%d is the %dth day in %d.\n", date.month, date.day, days, date.year);
	return 0;
}